package com.qijian.maindata.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qijian.maindata.domain.ProcessOrderUsersApprove;
import com.qijian.maindata.domain.query.ProcessOrderUsersApproveQuery;
import com.qijian.maindata.domain.vo.ProcessOrderUsersApproveVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 工序工单派单人员Mapper接口
 *
 * @author qijian
 * @date 2021-10-09
 */
public interface ProcessOrderUsersApproveMapper extends BaseMapper<ProcessOrderUsersApprove> {

    Page<ProcessOrderUsersApproveVo> selectVo(Page<ProcessOrderUsersApprove> page, @Param(Constants.WRAPPER) QueryWrapper<ProcessOrderUsersApproveQuery> queryWrapper);

    Page<ProcessOrderUsersApproveVo> listVo(Page<ProcessOrderUsersApprove> page, @Param(Constants.WRAPPER) QueryWrapper<ProcessOrderUsersApproveQuery> queryWrapper);

    int reject(@Param("workIds") List<Long> workIds, @Param("approveUserId") Long approveUserId, @Param("approveName") String approveName);

    int approve(@Param("workIds") List<Long> workIds, @Param("approveUserId") Long approveUserId, @Param("approveName") String approveName);

    int updateWorkOrder(@Param("workIds") List<Long> workIds);

    int updateProcessOrder(@Param("workIds") List<Long> workIds);

}
